package com.ruibang.glass.quality.mapper;

import com.ruibang.glass.common.domain.quality.HotGlassDefectNum;
import com.ruibang.glass.quality.domain.resp.MomMonthHotData;
import com.ruibang.glass.quality.domain.resp.SchedulingHotInfo;
import com.ruibang.glass.quality.entity.SchedulingReport;
import com.ruibang.glass.quality.entity.SlStationMes3Detail;
import com.teaming.cloud.framework2.autoconfigure.dynamic.datasource.annotation.DS;
import com.teaming.cloud.framework2.autoconfigure.mybatisplus.mapper.CommonMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @Author: songJinKang
 * @CreateTime: 2023-09-18  10:46
 * @Description: TODO
 * @Version: 1.0
 */
@Mapper
public interface SchedulingReportMapper extends CommonMapper<SchedulingReport> {

    @DS("cold1_bc2mes")
    List<SlStationMes3Detail> getColdGlassData(@Param("startTime") String startTime, @Param("endTime") String endTime);

    @DS("cold1_bc2mes")
    List<SlStationMes3Detail> getMonthColdInfo(@Param("startTime") String monthStartTime, @Param("endTime") String monthEndTime);

//    @DS("mom_dwh")
    @DS("hot2_bc2mes")
    SchedulingHotInfo getHotGlassData(@Param("startTime") long startTime, @Param("endTime") long endTime);

//    @DS("mom_dwh")
    @DS("hot2_bc2mes")
    MomMonthHotData getHotMonthGlassData(@Param("startTime")long monthStartTime, @Param("endTime")long monthEndTime);

    int getMoMcpkcData();

    HotGlassDefectNum getHotGlassDefectNum(@Param("startTime") LocalDateTime startTime, @Param("endTime") LocalDateTime endTime);
}
